<?php


namespace App\Listener;


use App\Event\UserRegistered;
use Hyperf\Event\Contract\ListenerInterface;
use Hyperf\Event\Annotation\Listener;

/**
 * @Listener(priority=1)
 * Class UserRegisteredEmailListener
 * @package App\Listener
 */
class UserRegisteredEmailListener implements ListenerInterface
{

    public function listen(): array
    {
        return [
            UserRegistered::class
        ];
    }

    public function process(object $event)
    {

        echo 111;
//        exit;
        print_r($event->user);
        // TODO: Implement process() method.
    }
}